import 'package:flutter/material.dart';
import 'package:get/get.dart';

class ColorsConfig{

  static Map<String,Color> methodTagColors={
    "GET":Colors.greenAccent,
    "POST":Colors.orangeAccent,
    "DELETE":Colors.redAccent,
    "PUT":Colors.blueAccent,
    "OPTIONS":Colors.pinkAccent
  };

  static Map<String,Color> envTagColors={
    "测试环境":Colors.greenAccent,
    "正式环境":Colors.orangeAccent,
    "体验环境":Colors.redAccent,
    "云端环境":Colors.blueAccent,
    "T":Colors.greenAccent,
    "F":Colors.orangeAccent,
    "E":Colors.redAccent,
    "C":Colors.blueAccent,
  };

  LinearGradient backgroundColorOfTheme=Get.isDarkMode?
   LinearGradient(
      colors: [
        const Color(0xff537895).withOpacity(0.65),
        const Color(0xFF09203F).withOpacity(0.75),
        ThemeData.dark().cardColor
      ],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter):
  const LinearGradient(
      colors: [
        Color(0xFFfeae8b),
        Color(0xFFf7e4ce),
        Colors.white12
      ],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter);

  LinearGradient navColorOfTheme=Get.isDarkMode?
  const LinearGradient(
    colors: [
      Color(0xff09203f),
      Color(0xFF537895),
    ],
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
  ):
  const LinearGradient(
    colors: [
      Color(0xffff9a8b),
      Color(0xFFff6a88),
      Color(0xffff99ac)
    ],
    begin: Alignment.topLeft,
    end: Alignment.bottomRight,
  );

  Color buttonColorOfTheme=Get.isDarkMode?
  const Color(0xff5D72AD):
  const Color(0xfffaaca8);
  
  LinearGradient cardColorOfTheme=Get.isDarkMode?
  LinearGradient(
      colors: [
        Color(0xff898EBA).withOpacity(0.75),
        Color(0xFF0D324D),
      ],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight
  ):
  LinearGradient(
      colors: [
        const Color(0xffa6bce8).withOpacity(0.5),
        const Color(0xffffc0c0).withOpacity(0.7)
      ],
      begin: Alignment.topLeft,
      end: Alignment.bottomRight
  );

  LinearGradient requestTypeColorOfTheme=Get.isDarkMode?
  const LinearGradient(
      colors: [
        Color(0xff1d2b64),
        Color(0xff9796f0)
      ],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter
  ):
  const LinearGradient(
      colors: [
        Color(0xffe1c0b6),
        Color(0xFFec8c8b)
      ],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter
  );

  Color iconColorOfTheme=Get.isDarkMode?
  const Color(0xffe8cdf8):
  Colors.redAccent.shade200.withOpacity(0.7);

  LinearGradient figureOfTheme=Get.isDarkMode?
  LinearGradient(
      colors: [
        Color(0xff1d2b64).withOpacity(0.3),
        Color(0xffe8cdf8)
      ],
      begin: Alignment.topCenter,
      end: Alignment.bottomCenter
  ):
  const LinearGradient(
      colors: [
        Color(0xfff0896a),
        Color(0xfff7bfa9),
        Color(0xfffad6c6)
      ],
      begin: Alignment.topRight,
      end: Alignment.bottomLeft
  );

  Color navIconColorsOfTheme=Get.isDarkMode? Color(0xffe8cdf8):Color(0xfff7c86d);

}